<!--
*Author：COCO
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/production/production_workorderchildren/Production_WorkOrderChildren.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/production/production_workorderchildren/Production_WorkOrderChildren.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'WorkOrderChildren_Id',
                footer: "Foots",
                cnName: '生产工单',
                name: 'production_workorderchildren/Production_WorkOrderChildren',
                url: "/Production_WorkOrderChildren/",
                sortName: "WorkOrderChildren_Id"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"MoCode":"","WoCode":"","WoCodeChild":"","ProductCode":"","ProductName":"","Status":""});
            const searchFormOptions = ref([[{"title":"订单号","field":"MoCode","type":"text"},{"title":"产品编码","field":"ProductCode","type":"text"},{"title":"产品名称","field":"ProductName","type":"text"}],[{"title":"工单号","field":"WoCode","type":"text"},{"title":"工单号","field":"WoCodeChild","type":"text"},{"dataKey":"workOrderDetailStatus","data":[],"title":"状态","field":"Status","type":"select"}]]);
            const columns = ref([{field:'WorkOrderChildren_Id',title:'工单明细ID',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'MoCode',title:'订单号',type:'string',width:180,require:true,align:'left',sort:true},
                       {field:'WoCode',title:'工单号',type:'string',width:180,hidden:true,align:'left'},
                       {field:'WoCodeChild',title:'工单号',type:'string',width:180,align:'left'},
                       {field:'Product_Id',title:'产品ID',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'ProductCode',title:'产品编码',type:'string',width:180,require:true,align:'left'},
                       {field:'ProductName',title:'产品名称',type:'string',width:180,require:true,align:'left'},
                       {field:'PlanQty',title:'计划数量',type:'int',width:110,require:true,align:'left'},
                       {field:'RealQty',title:'实际数量',type:'int',width:110,require:true,align:'left'},
                       {field:'GoodQty',title:'良品数',type:'int',width:110,require:true,align:'left'},
                       {field:'NoGoodQty',title:'不良品数',type:'int',width:110,require:true,align:'left'},
                       {field:'ScrapQty',title:'报废数',type:'int',width:80,align:'left'},
                       {field:'ProductStandard',title:'规格',type:'string',width:180,align:'left'},
                       {field:'Unit_Id',title:'单位',type:'int',bind:{ key:'unitList',data:[]},width:110,require:true,align:'left'},
                       {field:'ProductionSchedule',title:'生产进度',type:'string',width:900,align:'left'},
                       {field:'JobDate',title:'任务日期',type:'string',width:180,align:'left'},
                       {field:'AssociatedForm',title:'关联单据',type:'string',width:180,hidden:true,align:'left'},
                       {field:'FromType',title:'来源类型',type:'string',width:180,hidden:true,align:'left'},
                       {field:'Status',title:'状态',type:'string',bind:{ key:'workOrderDetailStatus',data:[]},width:180,require:true,align:'left'},
                       {field:'PlanStartDate',title:'计划开始时间',type:'datetime',width:110,require:true,align:'left',sort:true},
                       {field:'PlanEndDate',title:'计划结束时间',type:'datetime',width:110,require:true,align:'left',sort:true},
                       {field:'ReportTime',title:'报工时长',type:'datetime',width:110,hidden:true,align:'left',sort:true},
                       {field:'ActualStartDate',title:'实际开始时间',type:'datetime',width:110,align:'left',sort:true},
                       {field:'ActualEndDate',title:'实际结束时间',type:'datetime',width:110,align:'left',sort:true},
                       {field:'Remark',title:'备注',type:'string',width:220,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:110,align:'left',sort:true},
                       {field:'CreateID',title:'创建人ID',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:130,align:'left'},
                       {field:'Modifier',title:'修改人',type:'string',width:130,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:110,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人ID',type:'int',width:80,hidden:true,align:'left'},
                       {field:'TeamGroup',title:'班别',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Use_Id',title:'自定ID',type:'string',width:180,hidden:true,align:'left'},
                       {field:'Parent_Id',title:'父级ID',type:'string',width:180,hidden:true,align:'left'},
                       {field:'CusCode',title:'客户编码',type:'string',width:120,align:'left'},
                       {field:'CusName',title:'客户名称',type:'string',width:120,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
